<%@ page import="com.onlinevideo.entity.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
	<meta name="author" content="">
	<title>后台管理系统</title>
	<link href="../static/css/bootstrap.min.css" rel="stylesheet">
	<link href="../static/css/bootstrap-theme.min.css" rel="stylesheet">
	<link href=" " rel="stylesheet">
	<script src="../static/js/jquery-1.11.3.min.js" type="text/javascript"></script>
	<script src="../static/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="../static/js/sweetalert.min-2.1.2.js" type="text/javascript"></script>
	<style type="text/css">
		.nav-a{
			color: white;
		}
		a{
			color: #a7b1c2;
		}
		.abtn{
			color: black !important;
		}
		a:hover{
			color: white;
			text-decoration: none;
		}
		a:visited{
			color: white;
			text-decoration: none;
		}
		a:active{
			color: #a7b1c2;
			text-decoration: none;
		}
		a:link{
			text-decoration: none;
		}
		.group-li{
			background-color: #2f4050;
			border-width:0px ;
		}

	</style>
	<script type="text/javascript">
		$(function(){
			$(".alist").click(function(){
				$(this).next().toggle();
			});
			$(".opera").click(function(){
				var tex = $(this).text();
				var data_href = $(this).attr("data-href");
				var exits = $(this).attr("data-exist");
				var id = $(this).attr("id");
				if(exits == "0"){
					$(".nav-opera").append("<li><a href='javaScript:void(0)' data-href='"+data_href+"' class='abtn' >"+tex+" <span class='glyphicon glyphicon-remove-sign clos'  data-for='#"+id+"' style='margin-left: 5px;'></span></a></li>");
					$(this).attr("data-exist","1");
				}
				$(".conten").attr("src",data_href);
			});
			$("body").on("click",".clos",function(){
				$($(this).attr("data-for")).attr("data-exist","0");
				$(this).parent().parent().remove();
				if($( $(this).attr("data-for") ).attr("data-href") == $(".conten").attr("src") ){
					$(".conten").attr("src","../gateway?action=userlist");
				}
			});

			$(".refresh").click(function (event){
				event.preventDefault();
				var src = $(".conten").attr("src");
				$(".conten").attr("src",src);
			});
			$("body").on("click",".abtn",function(event){
				var nodeName = $(event.target).context.nodeName;
				if(nodeName == 'A'){
					$(".conten").attr("src",$(this).attr("data-href"));
				}
			});

		});
	</script>

</head>
<body>
<div class="container-fluid" style="padding: 0px;">
	<div class="col-md-2" style="color:white;padding: 0px;">
		<div class="row" style="margin: 0px;">
			<div style="width: 100%;height: 50px;background: skyblue;">
				<div class="col-md-4">
					<img src="../uploadFile/images/onlineVideo_logo.png" style="width: 90px;height: 50px;"  />
				</div>
				<div class="col-md-8">
					<span style="width: 100%;height: 50px;display: inline-block;line-height: 60px;color: black;">后台管理系统</span>
				</div>
			</div>
		</div>
		<div class="row" style="margin: 0px;">
			<ul class="list-group" style="height: 680px;background-color:#2f4050 ;margin-bottom: 0;">
				<li class="list-group-item group-li" style="padding: 0px;">
					<a class="nav-a alist" style="width: 100%;display: block;height: 40px;padding: 10px 20px ;"><span class="glyphicon glyphicon-cog" style="padding-right:10px;"></span>系统管理<span class="glyphicon glyphicon-menu-left" style="float: right;"></span></a>
					<ul class="list-group tex" style=" text-align: center;margin: 0px; background-color: #676a6c;">
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../user.do?action=queryByCondition" data-exist="0" id="mana01">用户管理</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=rolelist" data-exist="0" id="mana02">角色管理</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=bgvideolist" data-exist="0" id="mana03">视频审核</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=bgcomment" data-exist="0" id="mana04">评论举报</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=authoritylist" data-exist="0" id="mana05">权限管理</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=categorylist" data-exist="0" id="mana06">分类管理</a></li>
						<li class="list-group-item group-li" style="border: 0px solid #2f4050;"><a  class="opera" href="#" data-href="../gateway?action=bgvideolist" data-exist="0" id="mana07">数据分析</a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>

	<div class="col-md-10" style="padding: 0px;">
		<div class="row" style="width: 100%;height: 50px;margin: 0px;background-color: skyblue;">
			<ul class="nav navbar-nav navbar-right" style="margin-right: 15px;">
				<%
					HttpSession session1 = request.getSession();
					User user = (User)session1.getAttribute("bguser");
					if(user!=null){
				%>
				<div><a href="#"><%=user.getNickname()%></a></div>
				<div><a href="../user.do?action=loginOut">退出登录</a></div>
				<%
				}else {
				%>
				<script type="text/javascript">
					$(function (){
						swal("警告", "用户未登录或登录状态已经失效", "error").then(function (isOk) {});
					});
				</script>

				<%
					}
				%>
			</ul>
		</div>
		<div class="row" style="width: 100%;height: 50px;margin: 0px;">
			<ul class="nav navbar-nav navbar-left " >
				<li ><a href="#" class="abtn"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
				<li ><a href="#" class="abtn">首页</a></li>
			</ul>
			<!--顶部按钮区-->
			<ul class="nav navbar-nav navbar-left nav-opera"></ul>
			<ul class="nav navbar-nav navbar-right" style="margin-right: 15px;">
				<li><a href="#" class="abtn"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
				<li><a href="#" class="abtn refresh"><span class="glyphicon glyphicon-repeat"></span>刷新</a></li>
			</ul>
		</div>
		<div class="row" style="width: 100%;margin: 0px;">
			<iframe class="conten" src="../user.do?action=queryByCondition" style="width: 100%;height: 575px;"  frameborder="no" border="0" scrolling="yes" allowtransparency="yes"></iframe>
		</div>
	</div>
</div>
</body>
</html>
